package com.yanfan.modbus.frame;


import com.yanfan.modbus.code.FunctionCode;
import com.yanfan.modbus.exception.ModbusTransportException;
import com.yanfan.modbus.frame.abs.ReadBinaryRequest;

public class ReadDiscreteInputsRequest extends ReadBinaryRequest {

    public ReadDiscreteInputsRequest(int slaveId, int startOffset, int numberOfBits) throws ModbusTransportException {
        super(slaveId, startOffset, numberOfBits);
    }

    public ReadDiscreteInputsRequest(int slaveId) throws ModbusTransportException {
        super(slaveId);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public byte getFunctionCode() {
        return FunctionCode.READ_DISCRETE_INPUTS;
    }

    @Override
    public String toString() {
        return "ReadDiscreteInputsRequest [slaveId=" + slaveId + ", getFunctionCode()=" + getFunctionCode() + "," + super.toString() + "]";
    }
}
